-- GENERATED SPELL FOR [Burning Destroyer] --


function spell0_4038(pUnit, Event) --@Area Burn,n/a--
pUnit:FullCastSpellOnTarget(8000,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4038', 13000, 1)
end

function spell1_4038(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(9053,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4038', 3000, 1)
end

function Sorts_4038(pUnit, Event)
local choix_sorts_4038 = math.random(0, 1)
if choix_sorts_4038 == 0 then
pUnit:RegisterEvent('spell0_4038', 1, 1)
end
if choix_sorts_4038 == 1 then
pUnit:RegisterEvent('spell1_4038', 1, 1)
end
end

function mob4038_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4038', math.random(1500, 3000), 1)
end

function mob4038_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4038_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4038_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4038, 1, 'mob4038_Action')
RegisterUnitEvent(4038, 2, 'mob4038_Leave')
RegisterUnitEvent(4038, 3, 'mob4038_Kill')
RegisterUnitEvent(4038, 4, 'mob4038_Die')
